The present invention relates to the field of digital packet telecommunications, and more particularly to a TCP/IP host configured to detect a dead gateway.
Digital packets of information may be communicated between an organization""s internal network and the public Internet. The Internet is a collection of networks, including Arpanet, NSFnet, regional networks such as NY sernet, local networks at a number of university and research institutions, and a number of military networks. Many organizations use Internet gateways, implemented by computer workstations executing software, to provide a connection between the internal network and the Internet. These a Internet gateways can include firewall protection for the internal network in addition to providing connectivity between the internal network and the Internet. Where an organization uses more than one Internet gateway, each user on the organization""s internal network can, for example, be assigned to a designated Internet gateway. The users of the internal network are thereby provided access to the Internet through their designated Internet gateways.
Information is typically transmitted over the Internet using Transmission Control Protocol/Internet Protocol (TCP/IP) protocol suite. FIG. 1 illustrates the constituents of the TCP/IP protocol suite 100. The base layer of the TCP/IP protocol suite is the physical layer 110, which defines the mechanical, electrical, functional and procedural standards for the physical transmission of data over communications media. The physical layer may comprise electrical, mechanical or functional standards such as whether a network is packet switching or frame-switching or whether a network is based on a Carrier Sense Multiple Access/Collision Detection (CSMA/CD).
Overlying the physical layer 110 is the data link layer 120. Data link layer 120 provides the function and protocols to transfer data, e.g., transfer data between clients of different networks, and to detect errors that may occur at the physical layer. Operating modes at the data link layer 120 comprise such standard network topologies as IEEE 802.3 Ethernet, IEEE 802.5 Token Ring, ITU X.25, or serial (SLIP) protocols.
Network layer protocols 130 overlay the data link layer 120 and provide the means for establishing connections between networks. The standards of network layer protocols 130 provide operational control procedures for internetworking communications and routing information through multiple heterogenous networks. Examples of network layer protocols are the Internet Protocol (IP) and the Internet Control Message Protocol (ICMP). The Address Resolution Protocol (ARP) is used to correlate an Internet address and a Media Access Address (MAC) for a particular host. The Routing Information Protocol (RIP) is a dynamic routing protocol for passing routing information between hosts on networks. The Internet Control Message Protocol ICMP is an internal protocol for passing control messages between hosts on various networks. ICMP messages provide feedback about events in the network environment or can help determine if a path exists to a particular host in the network environment. The latter is commonly referred to as a xe2x80x9cpingxe2x80x9d. The Internet Protocol (IP) provides the basic mechanism for routing packets of information in the Internet. IP is a non-reliable communication protocol. It provides a xe2x80x9cbest effortsxe2x80x9d delivery service and does not commit network resources to a particular transaction, nor does it perform retransmissions or give acknowledgments.
The transport layer 140 provides end-to-end transport services across multiple heterogenous networks. The User Datagram Protocol (UDP) provides a connectionless, datagram oriented service which provides a non-reliable delivery mechanism for streams of information. The Transmission Control Protocol (TCP) provides a reliable session-based service for delivery of sequenced packets of information across the Internet. TCP provides a connection oriented reliable mechanism for information delivery.
The application layer 150 provides a list of network applications and utilities, a few of which are illustrated in FIG. 1. For example, File Transfer Protocol (FTP) is a standard TCP/IP protocol for transferring files from one computer to another. FTP clients establish sessions through TCP connections with FTP servers in order to obtain files. Telnet is a standard TCP/IP protocol for remote terminal connection. The Hypertext Transfer Protocol (HTTP) facilitates the transfer of data objects across networks via a system of uniform resource indicators (URL). The Simple Network Management Protocol (SNMP) is a standard for managing TCP/IP networks. A Remote Procedure Call (RPC) is a programming interface which enables programs to invoke remote functions on server machines.
Internet gateways generally use routing protocols, e.g., Open Shortest Path First (OSPF), to adjust to changes in the network. That is, routing of the digital packets of information may continue despite the fact that some routers are inoperative. However, Internet hosts generally do not participate in routing protocols. If a host""s first-hop gateway, i.e., first gateway to the Internet host, becomes inoperative, the host will not adjust and will continue to transmit digital packets of information through a gateway that is inoperative. Hence, the host is effectively transmitting digital packets of information down a xe2x80x9cblack hole.xe2x80x9d For this reason, RFC1122, the document which governs the routing of digital packets of information across the Internet states:
xe2x80x9cThe IP layer must be able to detect the failure of a xe2x80x98next-hopxe2x80x99 gateway that is listed in its route cache and to choose an alternative gateway.xe2x80x9d
One prior art solution to the host continuing to transmit digital packets of information to the dead gateway is to simply try another route if the TCP connection is failing. Since TCP provides feedback to a host if the transmission is failing, the host may be able to select another route through a different router or gateway to send the TCP traffic. However, non-TCP traffic involves protocols that do not provide feedback to a host if the transmission is failing. Since address resolution protocol (ARP) entries which obtain a data link layer address from the corresponding network layer address (the address that IP uses) in the host are cached for a certain duration, e.g., twenty minutes, non-TCP traffic will fail for as long as the ARP entry is cached despite the fact that there was an alternative gateway. That is, non-TCP traffic will continue to be transmitted to the first-hop gateway, i.e., gateway that is one hop from the host sending the data, that is inoperative.
It would therefore be desirable to allow a host to detect a first-hop dead gateway, i.e., gateway that is inoperative, and be able to send non-TCP data through an alternative route upon a subsequent non-TCP communication. It would further be desirable to allow the host to mark the first-hop dead gateway to a lower priority if it remains inoperative upon a subsequent new communication.
The problems outlined above may at least in part be solved in some embodiments by an application of a sender host sending a TCP packet of data through a first gateway to a receiver host. The first gateway is a first-hop away from the sender host. If TCP fails to receive an acknowledgment of received data from the receiver host, the ARP entry associated with the first-hop gateway is deleted in the sender host. When the application or a new application of the sender host establishes a new communication with a route through the gateway whose ARP entry was deleted, an ARP request is sent to that gateway by the sender host. If the sender host receives a response from the gateway whose ARP entry was previously deleted, then that gateway is operative. A TCP or non-TCP packet of data may then be sent by the application or new application of the sender host to the receiver host through the first-hop gateway whose ARP entry was previously deleted if the new communication established was TCP or non-TCP, respectively. If the sender host does not receive a response from the gateway whose ARP entry was previously deleted, then that gateway is inoperative, i.e., dead. The sender host then selects an alternative path through an alternative first-hop gateway in a routing table in the sender host. A TCP or non-TCP packet of data may then be sent to the receiver host by the application or new application of the sender host through the alternative first-hop gateway if the new communication was TCP or non-TCP, respectively.
In one embodiment, a method for detecting a first-hop dead gateway comprises the step of sending a TCP packet of data from an application of a sender host to a receiver host through a first gateway, where the first gateway is a first-hop away from the sender host. The method further comprises the step of TCP failing to receive an acknowledgment of received data from the receiver host. The method further comprises the step of deleting an ARP entry associated with the first gateway in the sender host. The method further comprises the step of selecting an alternative path to send the TCP packet of data from the sender host to the receiver host through a second gateway in a routing table in the sender host, where the second gateway is a first-hop away from the sender host. The method further comprises the step of establishing a new communication using the first gateway by the application or new application of the sender host. The method further comprises the step of sending an ARP request to the first gateway by the sender host. If the sender host receives a response from the first gateway, then the method further comprises the step of sending a TCP or non-TCP packet of data using the first gateway if the new communication was a TCP or non-TCP communication, respectively. If the sender host does not receive a response from the first gateway, then the method further comprises the step of selecting an alternative path through an alternative first-hop gateway in the routing table of the sender host. The application or new application of the sender host then sends the TCP or non-TCP packet of data using the alternative gateway if the new communication was a TCP or non-TCP communication, respectively.
In another embodiment of the present invention, if the sender host does not receive a response from the first gateway, i.e., gateway whose ARP entry was deleted, then all routes using that gateway are marked to a lower priority level in the routing table in the sender host. In another embodiment of the present invention, the routes through the gateway that were marked to a lower priority level may return to their original priority level upon a duration of time, e.g., five minutes.
The foregoing has outlined rather broadly the features and technical advantages of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which form the subject of the claims of the invention.